#!/bin/bash

curl --silent --insecure --cookie-jar /tmp/cookies.txt \
    --data 'login=neov&pass=Ne0vAdm1n' \
    --user-agent 'Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1' \
    https://41.190.236.27/sensorlist.htm > /dev/null

curl --silent --insecure --cookie /tmp/cookies.txt --cookie-jar /tmp/cookies.txt \
    --user-agent 'Mozilla/5.0 (Ubuntu; X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1' \
    'https://41.190.236.27/graphimg?id=547&subid=1&width=580&height=110&from='$(date +%Y%m%d-%H%M --date="30 hours ago")'&to='$(date +%Y%m%d-%H%M) > /var/www/html/orange/img-30h.png



#    --referer 'https://41.190.236.27/sensor.htm?timeout=60&id=547&position=0' \
